<div class="report_form">
	<?php echo $this->form;?>
</div>

<?php if (count($this->paginator)): ?>
<div class="list_report_summary">
<div class="list_report_total_trans">
	<div class="label"><?php echo $this->escape($this->translate("Number of customers")) . ": ";?></div>
	<div class="value"><?php echo $this->num_customers;?></div></div>
</div>
<div class="list_customerreport_admin">
	<div class="list_report_title">
		<div class="ltc0_report"><?php echo $this->translate("Num");?></div>
		<div class="ltc1_report"><?php echo $this->translate("Activation day");?></div>
		<div class="ltc1_report"><?php echo $this->translate("Activation hour");?></div>
		<div class="ltc2_report"><?php echo $this->translate("Msisdn");?></div>
		<div class="ltc9_report"><?php echo $this->translate("Agent");?></div>
		<div class="ltc3_report"><?php echo $this->translate("Device brand");?></div>
		<div class="ltc4_report"><?php echo $this->translate("Device model");?></div>

		<div class="ltc5_report"><?php echo $this->translate("Full name");?></div>
		<div class="ltc6_report"><?php echo $this->translate("City");?></div>
		<div class="ltc7_report"><?php echo $this->translate("Address");?></div>

	</div>
	<?php $i = 0;foreach ($this->paginator as $item): ?>
	<?php
		$agent_url_array = array(
			'controller' => 'agent',
			'action' => 'customerreport',
			'agentReportForm' => $item["agent_id"],
			'agentNameReportForm' => $item['agent_name']
		);	foreach($this->params as $key => $value){
			$agent_url_array[$key] = $value;
			$salesman_url_array[$key] = $value;
		}

		$agent_link = $this->url($agent_url_array);
	?>
	<?php if($i++ % 2):?>
	<div class="list_report_data_odd">
	<?php else:?>
	<div class="list_report_data_even">
	<?php endif;?>
		<div class="ldc0_report"><?php echo $this->escape($i + ($this->page -1)* $this->itemsPerPage);?></div>
		<div class="ldc1_report"><?php echo $this->escape(substr($item["activ_date"],8,2));?></div>
		<div class="ldc1_report"><?php echo $this->escape(substr($item["activ_date"],11,2));?></div>
		<div class="ldc2_report"><?php echo $this->escape($item["msisdn"]);?></div>
		<div class="ldc9_report"><a href="<?php echo $agent_link;?>"><?php echo $this->escape($item["agent_name"]);?></a></div>
		<div class="ldc3_report"><?php echo $this->escape($item["device_brand"]);?></div>
		<div class="ldc4_report"><?php echo $this->escape($item["device_model"]);?></div>

		<div class="ldc5_report"><?php echo $this->escape($item["fullname"]);?></div>
		<div class="ldc6_report"><?php echo $this->escape($item["city"]);?></div>
		<div class="ldc7_report"><?php echo $this->escape($item["address"]);?></div>

	</div>
	<?php endforeach;?>
</div>
<?php echo $this->paginationControl($this->paginator, 'Sliding', 'paging/search.phtml', array("params" => $this->params)); ?>
<?php endif;?>

